const delay = time => new Promise((resolve, reject) => {
    setTimeout(resolve, time);
});

function runCallback(fn, args, context) {
    typeof fn === 'function' && fn.apply(context || window, args);
}

module.exports = { delay };